package com.lykj.modules.shop.wrapper;

import com.lykj.core.mp.support.BaseEntityWrapper;
import com.lykj.core.tool.utils.BeanUtil;
import com.lykj.modules.shop.entity.UserFeedback;
    import com.lykj.modules.shop.vo.UserFeedbackVO;
import java.util.Objects;

/**
 * 问题反馈包装类,返回视图层所需的字段
 *
 * @author cxl
 * @since 2022-03-31
 */
public class UserFeedbackWrapper extends BaseEntityWrapper<UserFeedback, UserFeedbackVO>  {

	public static UserFeedbackWrapper build() {
		return new UserFeedbackWrapper();
 	}

	@Override
	public UserFeedbackVO entityVO(UserFeedback userFeedback) {
		UserFeedbackVO userFeedbackVO = Objects.requireNonNull(BeanUtil.copy(userFeedback, UserFeedbackVO.class));

		//User createUser = UserCache.getUser(userFeedback.getCreateUser());
		//User updateUser = UserCache.getUser(userFeedback.getUpdateUser());
		//userFeedbackVO.setCreateUserName(createUser.getName());
		//userFeedbackVO.setUpdateUserName(updateUser.getName());

		return userFeedbackVO;
	}

}
